import java.util.Arrays;


public class Person {

	
	
	
	String name;
	short age;
	String sex;
	String personalNumber;
	double weight;
	static Person[] friends;
	double money;
	Car car;
	
	Person(){
		this.age=0;
		this.weight=4.0;
		
		
	}
	Person(String name,String personalNumber, String sex,double money){
		
		this();
		this.money=money;
		this.name= name;
		this.personalNumber= personalNumber;
		this.sex=sex;
		this.friends= new Person[3];
		
		
	}
	void buyCar(Car car){
		if(this.money>car.price){
			this.car=car;
			this.money-=car.price;
		}
	}
	
	@Override
	public String toString() {
		return "Person [name=" + name + ", age=" + age + ", sex=" + sex
				+ ", personalNumber=" + personalNumber + ", weight=" + weight
				+ ", money=" + money + ", car=" + car + "]";
	}

		
}
